package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.Place.Zone;
import es.ats.codington.festival.domain.Stadium;



public class StadiumMapper implements RowMapper<Stadium>{

	@Override
	public Stadium mapRow(ResultSet resultSet, int numRow) throws SQLException {
		Stadium stadium = new Stadium();
		

			stadium.setIdPlace(resultSet.getInt("idPlace"));
			stadium.setPlaceName(resultSet.getString("placeName"));
			stadium.setZone(Zone.NORTH);
			stadium.setCapacity(resultSet.getInt("capacity"));
			stadium.setStadiumName(resultSet.getString("stadiumName"));
			
			
		return stadium;
	}

}
